
import { defineAsyncComponent} from 'vue';

const asyncLoader = () => defineAsyncComponent( () => import(`@/views/layout/index.vue`));
//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
    {
        path: '/',
        name: 'layout',
        component: asyncLoader()
    },
    {
        //登录
        path: '/login',
        name: 'login',
        component: () => import('@/views/login.vue'),
        meta: {
            title: '登录', //菜单标题
        },
    },
    {
        //404维护页
        path: '/404',
        name: 'notFound',
        component: () => import('@/views/not-found.vue'),
        meta: {
            title: '登录', //菜单标题
        },
    },
    {
        //其他未配置页面
        path: '/:pathMatch(.*)*',
        redirect: {
            name:'notFound'
        }
    },

]



